export interface IResponseData<T = any> {
    code: string;
    data: T;
    msg: string;
}

export interface IPageData<T = any> {
    currentPage: number;
    pageSize: number;
    records: Array<T>;
    totalPage: number;
    totalSize: number
}

interface RequestConfig {
    baseURL: string;
    header: Record<string, string>;
    method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'OPTIONS' | 'HEAD' | 'TRACE' | 'CONNECT';
    dataType: 'json';
    // #ifndef MP-ALIPAY
    responseType: 'text';
    // #endif
    custom: Record<string, any>;
    // #ifdef H5 || APP-PLUS || MP-ALIPAY || MP-WEIXIN
    timeout: number;
    // #endif
    // #ifdef APP-PLUS
    sslVerify: boolean;
    // #endif
    // #ifdef H5
    withCredentials: boolean;
    // #endif
    // #ifdef APP-PLUS
    firstIpv4: boolean;
    // #endif
    // 局部优先级高于全局，返回当前请求的 task，options。请勿在此处修改 options。非必填
    // getTask?: (task: any, options: RequestOptions) => void;
    // 全局自定义验证器。参数为 statusCode 且必存在，不用判断空情况。
    validateStatus: (statusCode: number) => boolean;
}